package com.example.springboot004extensionpoint;

import com.example.springboot004extensionpoint.applicationContextInitializer.KoalaCustomApplicationContextInitializer2;
import com.example.springboot004extensionpoint.applicationListener.ContextInitializedEventApplicationListener;
import com.example.springboot004extensionpoint.bootstrapRegistryInitializer.KoalaCustomBootstrapRegistryInitializer;
import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Springboot004ExtensionPointApplication {

    public static void main(String[] args) {
//        SpringApplication.run(Springboot004ExtensionPointApplication.class, args);
        SpringApplication springApplication = new SpringApplication(Springboot004ExtensionPointApplication.class);
        // 关闭banner
        springApplication.setBannerMode(Banner.Mode.OFF);
        springApplication.addInitializers(new KoalaCustomApplicationContextInitializer2());
        springApplication.addListeners(new ContextInitializedEventApplicationListener());
        springApplication.addBootstrapRegistryInitializer(new KoalaCustomBootstrapRegistryInitializer());
        springApplication.run(args);

    }
}
